<?php
if (empty ( $l0 )) :
	if (! empty ( $O0 )) :
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
	 endif;
	$O0 = 'pageinvite_settings';
	$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
	$O1 = $l1->info ( 'name' );
	$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
	$O2 = $l2->query ()->fetchall ();
	if (! empty ( $O2 )) {
		$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
	}
	$l3 = 'sitepageinvite';
	$O3 = 0;
	$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
	$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
	$l4 = '';
	$O4 = $l3 . '.navi.auth';
	$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
	$O5 = $this->getrequest ()->getpost ();
	if (! empty ( $O5 )) {
		if (empty ( $l5 )) {
			$l6 = $O5 ['environment_mode'];
		}
		$O5 = $O5 [$l3 . '_lsettings'];
	}
	if (empty ( $l5 )) {
		$form->setdescription ( '' );
		foreach ( $onactive_disabled as $O6 ) {
			$form->removeelement ( $O6 );
		}
	} else {
		foreach ( $afteractive_disabled as $l7 ) {
			$form->removeelement ( $l7 );
		}
	}
	$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
	$O7 = file_exists ( $file_path );
	$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
 endif;
if (empty ( $O8 )) :
	if (! empty ( $lv )) :
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
		if (empty ( $l0 )) :
			$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
			$O1 = $l1->info ( 'name' );
			$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
			$O2 = $l2->query ()->fetchall ();
			if (! empty ( $O2 )) {
				$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
			}
			$l3 = 'sitepageinvite';
			$O3 = 0;
			$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
			$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
			$l4 = '';
			$O4 = $l3 . '.navi.auth';
			$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
			$O5 = $this->getrequest ()->getpost ();
			if (! empty ( $O5 )) {
				if (empty ( $l5 )) {
					$l6 = $O5 ['environment_mode'];
				}
				$O5 = $O5 [$l3 . '_lsettings'];
			}
			if (empty ( $l5 )) {
				$form->setdescription ( '' );
				foreach ( $onactive_disabled as $O6 ) {
					$form->removeelement ( $O6 );
				}
			} else {
				foreach ( $afteractive_disabled as $l7 ) {
					$form->removeelement ( $l7 );
				}
			}
			$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
			$O7 = file_exists ( $file_path );
			$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
		 endif;
		if (empty ( $O8 )) :
			if (empty ( $l8 ) && empty ( $O7 )) {
				$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
			} else {
				if ($O5) {
					$l9 = '';
					$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
					foreach ( $O9 as $la ) {
						switch ($la->ptype ()) {
							case 'userconnection' :
								$name = 'userconnection';
								$Oa = 'user.licensekey';
								break;
							case 'feedbacks' :
								$name = 'feedback';
								$Oa = 'feedback.license_key';
								break;
							case 'suggestion' :
								$name = 'suggestion';
								$Oa = 'suggestion.controllersettings';
								break;
							case 'peopleyoumayknow' :
								$name = 'peopleyoumayknow';
								$Oa = 'pymk.controllersettings';
								break;
							case 'siteslideshow' :
								$name = 'siteslideshow';
								$Oa = 'siteslideshow.controllersettings';
								break;
							case 'mapprofiletypelevel' :
								$name = 'mapprofiletypelevel';
								$Oa = 'mapprofiletypelevel.controllersettings';
								break;
							case 'documentsv4' :
								$name = 'document';
								$Oa = 'document.controllersettings';
								break;
							case 'groupdocumentsv4' :
								$name = 'groupdocument';
								$Oa = 'groupdocument.controllersettings';
								break;
							case 'backup' :
								$name = 'dbbackup';
								$Oa = 'dbbackup.controllersettings';
								break;
							case 'mcard' :
								$name = 'mcard';
								$Oa = 'mcard.controllersettings';
								break;
							case 'like' :
								$name = 'sitelike';
								$Oa = 'sitelike.controllersettings';
								break;
							default :
								$name = $la->ptype ();
								$Oa = $la->ptype () . '.lsettings';
								break;
						}
						$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
						$moduleName = $moduleTable->info ( 'name' );
						$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
						$lb = $select->query ()->fetchall ();
						if (! empty ( $lb )) {
							$Ob ['version'] = $lb [0] ['version'];
							$Ob ['enabled'] = $lb [0] ['enabled'];
							$Ob ['status'] = 1;
						} else {
							$Ob ['status'] = 0;
						}
						$Ob ['key'] = $Oa;
						$lc = $Ob;
						$Oc = '';
						if (! empty ( $lc ['status'] )) {
							if (! empty ( $Ob ['enabled'] )) {
								$Oc .= '::' . $la->ptype () . ':1';
							} else {
								$Oc .= '::' . $la->ptype () . ':0';
							}
						}
					}
					$l9 = ltrim ( $l9, '::' );
					$ld = 'EventLikeShow';
					$Od = 0;
					$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
					$Oe = $O5;
					$Oe = trim ( $Oe );
					if (empty ( $O7 )) {
						$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
						$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
						if (empty ( $lg )) {
							$Og = curl_init ();
							$lh = 0;
							curl_setopt ( $Og, CURLOPT_URL, $Of );
							curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
							ob_start ();
							curl_exec ( $Og );
							curl_close ( $Og );
							$Oh = ob_get_contents ();
							if (empty ( $Oh )) {
								$Oh = @file_get_contents ( $Of );
							}
							ob_end_clean ();
						}
						if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
							$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
							$lj = 1;
						}
						if (empty ( $lj )) {
							if (empty ( $l5 )) {
								$Oj = 'meraMODULE' . $l3 . 'plugin.php';
							} else {
								$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
							}
							$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
							$Ok = 'ASDsdas';
							$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
							if (empty ( $get_value )) {
								$lm = $lk;
								$Om = curl_init ();
								$ln = 0;
								curl_setopt ( $Om, CURLOPT_URL, $lm );
								curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
								ob_start ();
								curl_exec ( $Om );
								curl_close ( $Om );
								if (empty ( $On )) {
									$get_value = ob_get_contents ();
								}
								if (empty ( $get_value )) {
									$get_value = @file_get_contents ( $lk );
								}
								ob_end_clean ();
							}
						}
					} else {
						include $file_path;
					}
					$lo = strrev ( $l3 );
					if (strstr ( $get_value, $lo )) {
						$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
						$lp = serialize ( $Oo );
						$Op = convert_uuencode ( $lp );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
						$lq = convert_uuencode ( $le );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
						engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
						if (empty ( $l5 )) {
							$Oq = explode ( '::', $get_value );
							if (! empty ( $Oq )) {
								$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
							}
							$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
							$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
							$ls = $l2->info ( 'name' );
							$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
							$Os = $select->query ()->fetchall ();
							if (empty ( $Os )) {
								$Oq = explode ( ';', $Oq );
								foreach ( $Oq as $lt ) {
									if (! empty ( $lt )) {
										$lr->query ( $lt );
									}
								}
							}
							if (! empty ( $l6 )) {
								$Ot = APPLICATION_PATH . '/application/settings/general.php';
								if (file_exists ( $Ot )) {
									$lu = include $Ot;
								} else {
									$lu = array ();
								}
								if (! is_writable ( $Ot )) {
									@chmod ( $Ot, 0666 );
								}
								$lu ['environment_mode'] = 'development';
								$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
								$Ou .= var_export ( $lu, TRUE );
								$Ou .= '; ?>';
								@file_put_contents ( $Ot, $Ou );
							}
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
							engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $form->getvalues ();
								if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
									engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
								}
							}
							$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
						} else {
							if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
								$values = $_POST;
								foreach ( $values as $key => $value ) {
									if ($key == 'pageinvite_show_webmail') {
										$value = serialize ( $value );
									}
									if ($key != 'submit') {
										engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
									}
								}
							}
						}
						$O3 = FALSE;
					} elseif (strstr ( $get_value, 'error' )) {
						$O3 = str_replace ( 'error::', '', $get_value );
					} else {
						$O3 = 'This license key is not valid';
					}
				}
			}
			if (! empty ( $Oi )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $Oi;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			} else if (! empty ( $O3 )) {
				$Od = 1;
				$this->view->status = FALSE;
				$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
				$error = $O3;
				$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
				$form->adderror ( $error );
				return;
			}
		 endif;
	 endif;
	$O0 = 'pageinvite_info_type';
	if (empty ( $l8 ) && empty ( $O7 )) {
		$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
	} else {
		if ($O5) {
			$l9 = '';
			$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
			foreach ( $O9 as $la ) {
				switch ($la->ptype ()) {
					case 'userconnection' :
						$name = 'userconnection';
						$Oa = 'user.licensekey';
						break;
					case 'feedbacks' :
						$name = 'feedback';
						$Oa = 'feedback.license_key';
						break;
					case 'suggestion' :
						$name = 'suggestion';
						$Oa = 'suggestion.controllersettings';
						break;
					case 'peopleyoumayknow' :
						$name = 'peopleyoumayknow';
						$Oa = 'pymk.controllersettings';
						break;
					case 'siteslideshow' :
						$name = 'siteslideshow';
						$Oa = 'siteslideshow.controllersettings';
						break;
					case 'mapprofiletypelevel' :
						$name = 'mapprofiletypelevel';
						$Oa = 'mapprofiletypelevel.controllersettings';
						break;
					case 'documentsv4' :
						$name = 'document';
						$Oa = 'document.controllersettings';
						break;
					case 'groupdocumentsv4' :
						$name = 'groupdocument';
						$Oa = 'groupdocument.controllersettings';
						break;
					case 'backup' :
						$name = 'dbbackup';
						$Oa = 'dbbackup.controllersettings';
						break;
					case 'mcard' :
						$name = 'mcard';
						$Oa = 'mcard.controllersettings';
						break;
					case 'like' :
						$name = 'sitelike';
						$Oa = 'sitelike.controllersettings';
						break;
					default :
						$name = $la->ptype ();
						$Oa = $la->ptype () . '.lsettings';
						break;
				}
				$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
				$moduleName = $moduleTable->info ( 'name' );
				$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
				$lb = $select->query ()->fetchall ();
				if (! empty ( $lb )) {
					$Ob ['version'] = $lb [0] ['version'];
					$Ob ['enabled'] = $lb [0] ['enabled'];
					$Ob ['status'] = 1;
				} else {
					$Ob ['status'] = 0;
				}
				$Ob ['key'] = $Oa;
				$lc = $Ob;
				$Oc = '';
				if (! empty ( $lc ['status'] )) {
					if (! empty ( $Ob ['enabled'] )) {
						$Oc .= '::' . $la->ptype () . ':1';
					} else {
						$Oc .= '::' . $la->ptype () . ':0';
					}
				}
			}
			$l9 = ltrim ( $l9, '::' );
			$ld = 'EventLikeShow';
			$Od = 0;
			$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
			$Oe = $O5;
			$Oe = trim ( $Oe );
			if (empty ( $O7 )) {
				$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
				$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
				if (empty ( $lg )) {
					$Og = curl_init ();
					$lh = 0;
					curl_setopt ( $Og, CURLOPT_URL, $Of );
					curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
					ob_start ();
					curl_exec ( $Og );
					curl_close ( $Og );
					$Oh = ob_get_contents ();
					if (empty ( $Oh )) {
						$Oh = @file_get_contents ( $Of );
					}
					ob_end_clean ();
				}
				if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
					$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
					$lj = 1;
				}
				if (empty ( $lj )) {
					if (empty ( $l5 )) {
						$Oj = 'meraMODULE' . $l3 . 'plugin.php';
					} else {
						$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
					}
					$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
					$Ok = 'ASDsdas';
					$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
					if (empty ( $get_value )) {
						$lm = $lk;
						$Om = curl_init ();
						$ln = 0;
						curl_setopt ( $Om, CURLOPT_URL, $lm );
						curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
						ob_start ();
						curl_exec ( $Om );
						curl_close ( $Om );
						if (empty ( $On )) {
							$get_value = ob_get_contents ();
						}
						if (empty ( $get_value )) {
							$get_value = @file_get_contents ( $lk );
						}
						ob_end_clean ();
					}
				}
			} else {
				include $file_path;
			}
			$lo = strrev ( $l3 );
			if (strstr ( $get_value, $lo )) {
				$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
				$lp = serialize ( $Oo );
				$Op = convert_uuencode ( $lp );
				engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
				$lq = convert_uuencode ( $le );
				engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
				engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
				engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
				engine_api::_ ()->getdbtable ( 'Socialengineaddons', 'socialengineaddon' )->modActivate ( 'sitepageinvite' );
				if (empty ( $l5 )) {
					$Oq = explode ( '::', $get_value );
					if (! empty ( $Oq )) {
						$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
					}
					$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
					$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
					$ls = $l2->info ( 'name' );
					$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
					$Os = $select->query ()->fetchall ();
					if (empty ( $Os )) {
						$Oq = explode ( ';', $Oq );
						foreach ( $Oq as $lt ) {
							if (! empty ( $lt )) {
								$lr->query ( $lt );
							}
						}
					}
					if (! empty ( $l6 )) {
						$Ot = APPLICATION_PATH . '/application/settings/general.php';
						if (file_exists ( $Ot )) {
							$lu = include $Ot;
						} else {
							$lu = array ();
						}
						if (! is_writable ( $Ot )) {
							@chmod ( $Ot, 0666 );
						}
						$lu ['environment_mode'] = 'development';
						$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
						$Ou .= var_export ( $lu, TRUE );
						$Ou .= '; ?>';
						@file_put_contents ( $Ot, $Ou );
					}
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
					if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
						$values = $form->getvalues ();
						if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
							engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
						}
					}
					$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
				} else {
					if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
						$values = $_POST;
						foreach ( $values as $key => $value ) {
							if ($key == 'pageinvite_show_webmail') {
								$value = serialize ( $value );
							}
							if ($key != 'submit') {
								engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
							}
						}
					}
				}
				$O3 = FALSE;
			} elseif (strstr ( $get_value, 'error' )) {
				$O3 = str_replace ( 'error::', '', $get_value );
			} else {
				$O3 = 'This license key is not valid';
			}
		}
	}
	if (! empty ( $Oi )) {
		$Od = 1;
		$this->view->status = FALSE;
		$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
		$error = $Oi;
		$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
		$form->adderror ( $error );
		return;
	} else if (! empty ( $O3 )) {
		$Od = 1;
		$this->view->status = FALSE;
		$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
		$error = $O3;
		$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
		$form->adderror ( $error );
		return;
	}
 endif;
if (! empty ( $lw )) :
	if (empty ( $l0 )) :
		$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
		$O1 = $l1->info ( 'name' );
		$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
		$O2 = $l2->query ()->fetchall ();
		if (! empty ( $O2 )) {
			$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
		}
		$l3 = 'sitepageinvite';
		$O3 = 0;
		$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
		$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
		$l4 = '';
		$O4 = $l3 . '.navi.auth';
		$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
		$O5 = $this->getrequest ()->getpost ();
		if (! empty ( $O5 )) {
			if (empty ( $l5 )) {
				$l6 = $O5 ['environment_mode'];
			}
			$O5 = $O5 [$l3 . '_lsettings'];
		}
		if (empty ( $l5 )) {
			$form->setdescription ( '' );
			foreach ( $onactive_disabled as $O6 ) {
				$form->removeelement ( $O6 );
			}
		} else {
			foreach ( $afteractive_disabled as $l7 ) {
				$form->removeelement ( $l7 );
			}
		}
		$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
		$O7 = file_exists ( $file_path );
		$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
	 endif;
	if (empty ( $O8 )) :
		if (empty ( $l8 ) && empty ( $O7 )) {
			$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
		} else {
			if ($O5) {
				$l9 = '';
				$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
				foreach ( $O9 as $la ) {
					switch ($la->ptype ()) {
						case 'userconnection' :
							$name = 'userconnection';
							$Oa = 'user.licensekey';
							break;
						case 'feedbacks' :
							$name = 'feedback';
							$Oa = 'feedback.license_key';
							break;
						case 'suggestion' :
							$name = 'suggestion';
							$Oa = 'suggestion.controllersettings';
							break;
						case 'peopleyoumayknow' :
							$name = 'peopleyoumayknow';
							$Oa = 'pymk.controllersettings';
							break;
						case 'siteslideshow' :
							$name = 'siteslideshow';
							$Oa = 'siteslideshow.controllersettings';
							break;
						case 'mapprofiletypelevel' :
							$name = 'mapprofiletypelevel';
							$Oa = 'mapprofiletypelevel.controllersettings';
							break;
						case 'documentsv4' :
							$name = 'document';
							$Oa = 'document.controllersettings';
							break;
						case 'groupdocumentsv4' :
							$name = 'groupdocument';
							$Oa = 'groupdocument.controllersettings';
							break;
						case 'backup' :
							$name = 'dbbackup';
							$Oa = 'dbbackup.controllersettings';
							break;
						case 'mcard' :
							$name = 'mcard';
							$Oa = 'mcard.controllersettings';
							break;
						case 'like' :
							$name = 'sitelike';
							$Oa = 'sitelike.controllersettings';
							break;
						default :
							$name = $la->ptype ();
							$Oa = $la->ptype () . '.lsettings';
							break;
					}
					$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
					$moduleName = $moduleTable->info ( 'name' );
					$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
					$lb = $select->query ()->fetchall ();
					if (! empty ( $lb )) {
						$Ob ['version'] = $lb [0] ['version'];
						$Ob ['enabled'] = $lb [0] ['enabled'];
						$Ob ['status'] = 1;
					} else {
						$Ob ['status'] = 0;
					}
					$Ob ['key'] = $Oa;
					$lc = $Ob;
					$Oc = '';
					if (! empty ( $lc ['status'] )) {
						if (! empty ( $Ob ['enabled'] )) {
							$Oc .= '::' . $la->ptype () . ':1';
						} else {
							$Oc .= '::' . $la->ptype () . ':0';
						}
					}
				}
				$l9 = ltrim ( $l9, '::' );
				$ld = 'EventLikeShow';
				$Od = 0;
				$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
				$Oe = $O5;
				$Oe = trim ( $Oe );
				if (empty ( $O7 )) {
					$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
					$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
					if (empty ( $lg )) {
						$Og = curl_init ();
						$lh = 0;
						curl_setopt ( $Og, CURLOPT_URL, $Of );
						curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
						ob_start ();
						curl_exec ( $Og );
						curl_close ( $Og );
						$Oh = ob_get_contents ();
						if (empty ( $Oh )) {
							$Oh = @file_get_contents ( $Of );
						}
						ob_end_clean ();
					}
					if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
						$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
						$lj = 1;
					}
					if (empty ( $lj )) {
						if (empty ( $l5 )) {
							$Oj = 'meraMODULE' . $l3 . 'plugin.php';
						} else {
							$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
						}
						$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
						$Ok = 'ASDsdas';
						$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
						if (empty ( $get_value )) {
							$lm = $lk;
							$Om = curl_init ();
							$ln = 0;
							curl_setopt ( $Om, CURLOPT_URL, $lm );
							curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
							ob_start ();
							curl_exec ( $Om );
							curl_close ( $Om );
							if (empty ( $On )) {
								$get_value = ob_get_contents ();
							}
							if (empty ( $get_value )) {
								$get_value = @file_get_contents ( $lk );
							}
							ob_end_clean ();
						}
					}
				} else {
					include $file_path;
				}
				$lo = strrev ( $l3 );
				if (strstr ( $get_value, $lo )) {
					$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
					$lp = serialize ( $Oo );
					$Op = convert_uuencode ( $lp );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
					$lq = convert_uuencode ( $le );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
					engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
					if (empty ( $l5 )) {
						$Oq = explode ( '::', $get_value );
						if (! empty ( $Oq )) {
							$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
						}
						$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
						$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
						$ls = $l2->info ( 'name' );
						$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
						$Os = $select->query ()->fetchall ();
						if (empty ( $Os )) {
							$Oq = explode ( ';', $Oq );
							foreach ( $Oq as $lt ) {
								if (! empty ( $lt )) {
									$lr->query ( $lt );
								}
							}
						}
						if (! empty ( $l6 )) {
							$Ot = APPLICATION_PATH . '/application/settings/general.php';
							if (file_exists ( $Ot )) {
								$lu = include $Ot;
							} else {
								$lu = array ();
							}
							if (! is_writable ( $Ot )) {
								@chmod ( $Ot, 0666 );
							}
							$lu ['environment_mode'] = 'development';
							$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
							$Ou .= var_export ( $lu, TRUE );
							$Ou .= '; ?>';
							@file_put_contents ( $Ot, $Ou );
						}
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
						if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
							$values = $form->getvalues ();
							if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
								engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
							}
						}
						$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
					} else {
						if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
							$values = $_POST;
							foreach ( $values as $key => $value ) {
								if ($key == 'pageinvite_show_webmail') {
									$value = serialize ( $value );
								}
								if ($key != 'submit') {
									engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
								}
							}
						}
					}
					$O3 = FALSE;
				} elseif (strstr ( $get_value, 'error' )) {
					$O3 = str_replace ( 'error::', '', $get_value );
				} else {
					$O3 = 'This license key is not valid';
				}
			}
		}
		if (! empty ( $Oi )) {
			$Od = 1;
			$this->view->status = FALSE;
			$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
			$error = $Oi;
			$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
			$form->adderror ( $error );
			return;
		} else if (! empty ( $O3 )) {
			$Od = 1;
			$this->view->status = FALSE;
			$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
			$error = $O3;
			$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
			$form->adderror ( $error );
			return;
		}
	 endif;
	if (empty ( $l0 )) :
		$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
		$O1 = $l1->info ( 'name' );
		$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
		$O2 = $l2->query ()->fetchall ();
		if (! empty ( $O2 )) {
			$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
		}
		$l3 = 'sitepageinvite';
		$O3 = 0;
		$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
		$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
		$l4 = '';
		$O4 = $l3 . '.navi.auth';
		$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
		$O5 = $this->getrequest ()->getpost ();
		if (! empty ( $O5 )) {
			if (empty ( $l5 )) {
				$l6 = $O5 ['environment_mode'];
			}
			$O5 = $O5 [$l3 . '_lsettings'];
		}
		if (empty ( $l5 )) {
			$form->setdescription ( '' );
			foreach ( $onactive_disabled as $O6 ) {
				$form->removeelement ( $O6 );
			}
		} else {
			foreach ( $afteractive_disabled as $l7 ) {
				$form->removeelement ( $l7 );
			}
		}
		$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
		$O7 = file_exists ( $file_path );
		$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
	 endif;
	if (empty ( $O8 )) :
		if (empty ( $l8 ) && empty ( $O7 )) {
			$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
		} else {
			if ($O5) {
				$l9 = '';
				$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
				foreach ( $O9 as $la ) {
					switch ($la->ptype ()) {
						case 'userconnection' :
							$name = 'userconnection';
							$Oa = 'user.licensekey';
							break;
						case 'feedbacks' :
							$name = 'feedback';
							$Oa = 'feedback.license_key';
							break;
						case 'suggestion' :
							$name = 'suggestion';
							$Oa = 'suggestion.controllersettings';
							break;
						case 'peopleyoumayknow' :
							$name = 'peopleyoumayknow';
							$Oa = 'pymk.controllersettings';
							break;
						case 'siteslideshow' :
							$name = 'siteslideshow';
							$Oa = 'siteslideshow.controllersettings';
							break;
						case 'mapprofiletypelevel' :
							$name = 'mapprofiletypelevel';
							$Oa = 'mapprofiletypelevel.controllersettings';
							break;
						case 'documentsv4' :
							$name = 'document';
							$Oa = 'document.controllersettings';
							break;
						case 'groupdocumentsv4' :
							$name = 'groupdocument';
							$Oa = 'groupdocument.controllersettings';
							break;
						case 'backup' :
							$name = 'dbbackup';
							$Oa = 'dbbackup.controllersettings';
							break;
						case 'mcard' :
							$name = 'mcard';
							$Oa = 'mcard.controllersettings';
							break;
						case 'like' :
							$name = 'sitelike';
							$Oa = 'sitelike.controllersettings';
							break;
						default :
							$name = $la->ptype ();
							$Oa = $la->ptype () . '.lsettings';
							break;
					}
					$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
					$moduleName = $moduleTable->info ( 'name' );
					$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
					$lb = $select->query ()->fetchall ();
					if (! empty ( $lb )) {
						$Ob ['version'] = $lb [0] ['version'];
						$Ob ['enabled'] = $lb [0] ['enabled'];
						$Ob ['status'] = 1;
					} else {
						$Ob ['status'] = 0;
					}
					$Ob ['key'] = $Oa;
					$lc = $Ob;
					$Oc = '';
					if (! empty ( $lc ['status'] )) {
						if (! empty ( $Ob ['enabled'] )) {
							$Oc .= '::' . $la->ptype () . ':1';
						} else {
							$Oc .= '::' . $la->ptype () . ':0';
						}
					}
				}
				$l9 = ltrim ( $l9, '::' );
				$ld = 'EventLikeShow';
				$Od = 0;
				$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
				$Oe = $O5;
				$Oe = trim ( $Oe );
				if (empty ( $O7 )) {
					$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
					$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
					if (empty ( $lg )) {
						$Og = curl_init ();
						$lh = 0;
						curl_setopt ( $Og, CURLOPT_URL, $Of );
						curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
						ob_start ();
						curl_exec ( $Og );
						curl_close ( $Og );
						$Oh = ob_get_contents ();
						if (empty ( $Oh )) {
							$Oh = @file_get_contents ( $Of );
						}
						ob_end_clean ();
					}
					if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
						$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
						$lj = 1;
					}
					if (empty ( $lj )) {
						if (empty ( $l5 )) {
							$Oj = 'meraMODULE' . $l3 . 'plugin.php';
						} else {
							$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
						}
						$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
						$Ok = 'ASDsdas';
						$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
						if (empty ( $get_value )) {
							$lm = $lk;
							$Om = curl_init ();
							$ln = 0;
							curl_setopt ( $Om, CURLOPT_URL, $lm );
							curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
							ob_start ();
							curl_exec ( $Om );
							curl_close ( $Om );
							if (empty ( $On )) {
								$get_value = ob_get_contents ();
							}
							if (empty ( $get_value )) {
								$get_value = @file_get_contents ( $lk );
							}
							ob_end_clean ();
						}
					}
				} else {
					include $file_path;
				}
				$lo = strrev ( $l3 );
				if (strstr ( $get_value, $lo )) {
					$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
					$lp = serialize ( $Oo );
					$Op = convert_uuencode ( $lp );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
					$lq = convert_uuencode ( $le );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
					engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
					if (empty ( $l5 )) {
						$Oq = explode ( '::', $get_value );
						if (! empty ( $Oq )) {
							$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
						}
						$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
						$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
						$ls = $l2->info ( 'name' );
						$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
						$Os = $select->query ()->fetchall ();
						if (empty ( $Os )) {
							$Oq = explode ( ';', $Oq );
							foreach ( $Oq as $lt ) {
								if (! empty ( $lt )) {
									$lr->query ( $lt );
								}
							}
						}
						if (! empty ( $l6 )) {
							$Ot = APPLICATION_PATH . '/application/settings/general.php';
							if (file_exists ( $Ot )) {
								$lu = include $Ot;
							} else {
								$lu = array ();
							}
							if (! is_writable ( $Ot )) {
								@chmod ( $Ot, 0666 );
							}
							$lu ['environment_mode'] = 'development';
							$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
							$Ou .= var_export ( $lu, TRUE );
							$Ou .= '; ?>';
							@file_put_contents ( $Ot, $Ou );
						}
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
						if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
							$values = $form->getvalues ();
							if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
								engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
							}
						}
						$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
					} else {
						if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
							$values = $_POST;
							foreach ( $values as $key => $value ) {
								if ($key == 'pageinvite_show_webmail') {
									$value = serialize ( $value );
								}
								if ($key != 'submit') {
									engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
								}
							}
						}
					}
					$O3 = FALSE;
				} elseif (strstr ( $get_value, 'error' )) {
					$O3 = str_replace ( 'error::', '', $get_value );
				} else {
					$O3 = 'This license key is not valid';
				}
			}
		}
		if (! empty ( $Oi )) {
			$Od = 1;
			$this->view->status = FALSE;
			$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
			$error = $Oi;
			$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
			$form->adderror ( $error );
			return;
		} else if (! empty ( $O3 )) {
			$Od = 1;
			$this->view->status = FALSE;
			$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
			$error = $O3;
			$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
			$form->adderror ( $error );
			return;
		}
	 endif;
	if (empty ( $l0 )) :
		$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
		$O1 = $l1->info ( 'name' );
		$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
		$O2 = $l2->query ()->fetchall ();
		if (! empty ( $O2 )) {
			$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
		}
		$l3 = 'sitepageinvite';
		$O3 = 0;
		$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
		$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
		$l4 = '';
		$O4 = $l3 . '.navi.auth';
		$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
		$O5 = $this->getrequest ()->getpost ();
		if (! empty ( $O5 )) {
			if (empty ( $l5 )) {
				$l6 = $O5 ['environment_mode'];
			}
			$O5 = $O5 [$l3 . '_lsettings'];
		}
		if (empty ( $l5 )) {
			$form->setdescription ( '' );
			foreach ( $onactive_disabled as $O6 ) {
				$form->removeelement ( $O6 );
			}
		} else {
			foreach ( $afteractive_disabled as $l7 ) {
				$form->removeelement ( $l7 );
			}
		}
		$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
		$O7 = file_exists ( $file_path );
		$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
	 endif;
	if (empty ( $O8 )) :
		if (empty ( $l8 ) && empty ( $O7 )) {
			$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
		} else {
			if ($O5) {
				$l9 = '';
				$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
				foreach ( $O9 as $la ) {
					switch ($la->ptype ()) {
						case 'userconnection' :
							$name = 'userconnection';
							$Oa = 'user.licensekey';
							break;
						case 'feedbacks' :
							$name = 'feedback';
							$Oa = 'feedback.license_key';
							break;
						case 'suggestion' :
							$name = 'suggestion';
							$Oa = 'suggestion.controllersettings';
							break;
						case 'peopleyoumayknow' :
							$name = 'peopleyoumayknow';
							$Oa = 'pymk.controllersettings';
							break;
						case 'siteslideshow' :
							$name = 'siteslideshow';
							$Oa = 'siteslideshow.controllersettings';
							break;
						case 'mapprofiletypelevel' :
							$name = 'mapprofiletypelevel';
							$Oa = 'mapprofiletypelevel.controllersettings';
							break;
						case 'documentsv4' :
							$name = 'document';
							$Oa = 'document.controllersettings';
							break;
						case 'groupdocumentsv4' :
							$name = 'groupdocument';
							$Oa = 'groupdocument.controllersettings';
							break;
						case 'backup' :
							$name = 'dbbackup';
							$Oa = 'dbbackup.controllersettings';
							break;
						case 'mcard' :
							$name = 'mcard';
							$Oa = 'mcard.controllersettings';
							break;
						case 'like' :
							$name = 'sitelike';
							$Oa = 'sitelike.controllersettings';
							break;
						default :
							$name = $la->ptype ();
							$Oa = $la->ptype () . '.lsettings';
							break;
					}
					$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
					$moduleName = $moduleTable->info ( 'name' );
					$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
					$lb = $select->query ()->fetchall ();
					if (! empty ( $lb )) {
						$Ob ['version'] = $lb [0] ['version'];
						$Ob ['enabled'] = $lb [0] ['enabled'];
						$Ob ['status'] = 1;
					} else {
						$Ob ['status'] = 0;
					}
					$Ob ['key'] = $Oa;
					$lc = $Ob;
					$Oc = '';
					if (! empty ( $lc ['status'] )) {
						if (! empty ( $Ob ['enabled'] )) {
							$Oc .= '::' . $la->ptype () . ':1';
						} else {
							$Oc .= '::' . $la->ptype () . ':0';
						}
					}
				}
				$l9 = ltrim ( $l9, '::' );
				$ld = 'EventLikeShow';
				$Od = 0;
				$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
				$Oe = $O5;
				$Oe = trim ( $Oe );
				if (empty ( $O7 )) {
					$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
					$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
					if (empty ( $lg )) {
						$Og = curl_init ();
						$lh = 0;
						curl_setopt ( $Og, CURLOPT_URL, $Of );
						curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
						ob_start ();
						curl_exec ( $Og );
						curl_close ( $Og );
						$Oh = ob_get_contents ();
						if (empty ( $Oh )) {
							$Oh = @file_get_contents ( $Of );
						}
						ob_end_clean ();
					}
					if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
						$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
						$lj = 1;
					}
					if (empty ( $lj )) {
						if (empty ( $l5 )) {
							$Oj = 'meraMODULE' . $l3 . 'plugin.php';
						} else {
							$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
						}
						$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
						$Ok = 'ASDsdas';
						$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
						if (empty ( $get_value )) {
							$lm = $lk;
							$Om = curl_init ();
							$ln = 0;
							curl_setopt ( $Om, CURLOPT_URL, $lm );
							curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
							ob_start ();
							curl_exec ( $Om );
							curl_close ( $Om );
							if (empty ( $On )) {
								$get_value = ob_get_contents ();
							}
							if (empty ( $get_value )) {
								$get_value = @file_get_contents ( $lk );
							}
							ob_end_clean ();
						}
					}
				} else {
					include $file_path;
				}
				$lo = strrev ( $l3 );
				if (strstr ( $get_value, $lo )) {
					$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
					$lp = serialize ( $Oo );
					$Op = convert_uuencode ( $lp );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
					$lq = convert_uuencode ( $le );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
					engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
					if (empty ( $l5 )) {
						$Oq = explode ( '::', $get_value );
						if (! empty ( $Oq )) {
							$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
						}
						$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
						$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
						$ls = $l2->info ( 'name' );
						$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
						$Os = $select->query ()->fetchall ();
						if (empty ( $Os )) {
							$Oq = explode ( ';', $Oq );
							foreach ( $Oq as $lt ) {
								if (! empty ( $lt )) {
									$lr->query ( $lt );
								}
							}
						}
						if (! empty ( $l6 )) {
							$Ot = APPLICATION_PATH . '/application/settings/general.php';
							if (file_exists ( $Ot )) {
								$lu = include $Ot;
							} else {
								$lu = array ();
							}
							if (! is_writable ( $Ot )) {
								@chmod ( $Ot, 0666 );
							}
							$lu ['environment_mode'] = 'development';
							$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
							$Ou .= var_export ( $lu, TRUE );
							$Ou .= '; ?>';
							@file_put_contents ( $Ot, $Ou );
						}
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
						if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
							$values = $form->getvalues ();
							if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
								engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
							}
						}
						$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
					} else {
						if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
							$values = $_POST;
							foreach ( $values as $key => $value ) {
								if ($key == 'pageinvite_show_webmail') {
									$value = serialize ( $value );
								}
								if ($key != 'submit') {
									engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
								}
							}
						}
					}
					$O3 = FALSE;
				} elseif (strstr ( $get_value, 'error' )) {
					$O3 = str_replace ( 'error::', '', $get_value );
				} else {
					$O3 = 'This license key is not valid';
				}
			}
		}
		if (! empty ( $Oi )) {
			$Od = 1;
			$this->view->status = FALSE;
			$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
			$error = $Oi;
			$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
			$form->adderror ( $error );
			return;
		} else if (! empty ( $O3 )) {
			$Od = 1;
			$this->view->status = FALSE;
			$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
			$error = $O3;
			$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
			$form->adderror ( $error );
			return;
		}
	 endif;
	if (empty ( $l0 )) :
		$l1 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
		$O1 = $l1->info ( 'name' );
		$l2 = $l1->select ()->from ( $O1, array ('id' ) )->where ( 'params = ?', '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "readme"}' )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
		$O2 = $l2->query ()->fetchall ();
		if (! empty ( $O2 )) {
			$l1->update ( array ('params' => '{"route":"admin_default","module":"sitepageinvite","controller":"global", "action": "global"}' ), array ('name =?' => 'core_admin_main_plugins_sitepageinvite' ) );
		}
		$l3 = 'sitepageinvite';
		$O3 = 0;
		$this->view->navigation = engine_api::_ ()->getapi ( 'menus', 'core' )->getnavigation ( 'sitepageinvite_admin_main', array (), 'sitepageinvite_admin_main_global' );
		$this->view->form = $form = new Sitepageinvite_Form_Admin_Global ();
		$l4 = '';
		$O4 = $l3 . '.navi.auth';
		$l5 = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( $O4 );
		$O5 = $this->getrequest ()->getpost ();
		if (! empty ( $O5 )) {
			if (empty ( $l5 )) {
				$l6 = $O5 ['environment_mode'];
			}
			$O5 = $O5 [$l3 . '_lsettings'];
		}
		if (empty ( $l5 )) {
			$form->setdescription ( '' );
			foreach ( $onactive_disabled as $O6 ) {
				$form->removeelement ( $O6 );
			}
		} else {
			foreach ( $afteractive_disabled as $l7 ) {
				$form->removeelement ( $l7 );
			}
		}
		$file_path = APPLICATION_PATH . '/application/modules/' . ucfirst ( $l3 ) . '/controllers/license/ilicense.php';
		$O7 = file_exists ( $file_path );
		$l8 = engine_api::_ ()->getdbtable ( 'modules', 'core' )->ismoduleenabled ( 'socialengineaddon' );
	 endif;
	if (empty ( $O8 )) :
		if (empty ( $l8 ) && empty ( $O7 )) {
			$O3 = '<a href="http://www.socialengineaddons.com/resources/socialengineaddons-core-plugin-free" target="_blank">The SocialEngineAddOns Core Plugin</a> is not installed on your site. Please download the latest version of this FREE plugin from your Client Area on <a href="http://www.socialengineaddons.com" target="_blank">SocialEngineAddOns</a>.';
		} else {
			if ($O5) {
				$l9 = '';
				$O9 = Zend_Feed::import ( 'http://www.socialengineaddons.com/plugins/feed' );
				foreach ( $O9 as $la ) {
					switch ($la->ptype ()) {
						case 'userconnection' :
							$name = 'userconnection';
							$Oa = 'user.licensekey';
							break;
						case 'feedbacks' :
							$name = 'feedback';
							$Oa = 'feedback.license_key';
							break;
						case 'suggestion' :
							$name = 'suggestion';
							$Oa = 'suggestion.controllersettings';
							break;
						case 'peopleyoumayknow' :
							$name = 'peopleyoumayknow';
							$Oa = 'pymk.controllersettings';
							break;
						case 'siteslideshow' :
							$name = 'siteslideshow';
							$Oa = 'siteslideshow.controllersettings';
							break;
						case 'mapprofiletypelevel' :
							$name = 'mapprofiletypelevel';
							$Oa = 'mapprofiletypelevel.controllersettings';
							break;
						case 'documentsv4' :
							$name = 'document';
							$Oa = 'document.controllersettings';
							break;
						case 'groupdocumentsv4' :
							$name = 'groupdocument';
							$Oa = 'groupdocument.controllersettings';
							break;
						case 'backup' :
							$name = 'dbbackup';
							$Oa = 'dbbackup.controllersettings';
							break;
						case 'mcard' :
							$name = 'mcard';
							$Oa = 'mcard.controllersettings';
							break;
						case 'like' :
							$name = 'sitelike';
							$Oa = 'sitelike.controllersettings';
							break;
						default :
							$name = $la->ptype ();
							$Oa = $la->ptype () . '.lsettings';
							break;
					}
					$moduleTable = engine_api::_ ()->getdbtable ( 'modules', 'core' );
					$moduleName = $moduleTable->info ( 'name' );
					$select = $moduleTable->select ()->setintegritycheck ( FALSE )->from ( $moduleName, array ('version', 'enabled' ) )->where ( 'name = ?', $name )->limit ( 1 );
					$lb = $select->query ()->fetchall ();
					if (! empty ( $lb )) {
						$Ob ['version'] = $lb [0] ['version'];
						$Ob ['enabled'] = $lb [0] ['enabled'];
						$Ob ['status'] = 1;
					} else {
						$Ob ['status'] = 0;
					}
					$Ob ['key'] = $Oa;
					$lc = $Ob;
					$Oc = '';
					if (! empty ( $lc ['status'] )) {
						if (! empty ( $Ob ['enabled'] )) {
							$Oc .= '::' . $la->ptype () . ':1';
						} else {
							$Oc .= '::' . $la->ptype () . ':0';
						}
					}
				}
				$l9 = ltrim ( $l9, '::' );
				$ld = 'EventLikeShow';
				$Od = 0;
				$le = str_replace ( 'www.', '', strtolower ( $_SERVER ['HTTP_HOST'] ) );
				$Oe = $O5;
				$Oe = trim ( $Oe );
				if (empty ( $O7 )) {
					$lf = engine_api::_ ()->getapi ( 'settings', 'core' )->getsetting ( 'sitepage.lsettings' );
					$Of = 'http://www.socialengineaddons.com/simpleMODULEsitepageplugin.php?checking=' . $lf . '&surl=' . $le . '&type=sitepage&ptype=' . $l9;
					if (empty ( $lg )) {
						$Og = curl_init ();
						$lh = 0;
						curl_setopt ( $Og, CURLOPT_URL, $Of );
						curl_setopt ( $Og, CURLOPT_CONNECTTIMEOUT, $lh );
						ob_start ();
						curl_exec ( $Og );
						curl_close ( $Og );
						$Oh = ob_get_contents ();
						if (empty ( $Oh )) {
							$Oh = @file_get_contents ( $Of );
						}
						ob_end_clean ();
					}
					if (! strstr ( $Oh, strrev ( 'sitepage' ) )) {
						$Oi = $this->view->translate ( 'PARENT_KEY_NOT_VALID' );
						$lj = 1;
					}
					if (empty ( $lj )) {
						if (empty ( $l5 )) {
							$Oj = 'meraMODULE' . $l3 . 'plugin.php';
						} else {
							$Oj = 'simpleMODULE' . $l3 . 'plugin.php';
						}
						$lk = 'http://www.socialengineaddons.com/' . $Oj . '?checking=' . $Oe . '&surl=' . $le . '&type=' . $l3 . '&ptype=' . $l9;
						$Ok = 'ASDsdas';
						$ll = 'http://demo.socialengineaddons.com/meraMODULE.php?ASDA=' . $Ok;
						if (empty ( $get_value )) {
							$lm = $lk;
							$Om = curl_init ();
							$ln = 0;
							curl_setopt ( $Om, CURLOPT_URL, $lm );
							curl_setopt ( $Om, CURLOPT_CONNECTTIMEOUT, $ln );
							ob_start ();
							curl_exec ( $Om );
							curl_close ( $Om );
							if (empty ( $On )) {
								$get_value = ob_get_contents ();
							}
							if (empty ( $get_value )) {
								$get_value = @file_get_contents ( $lk );
							}
							ob_end_clean ();
						}
					}
				} else {
					include $file_path;
				}
				$lo = strrev ( $l3 );
				if (strstr ( $get_value, $lo )) {
					$Oo = array ('host_att' => $le, 'auth_att' => 1, 'is_att' => 1 );
					$lp = serialize ( $Oo );
					$Op = convert_uuencode ( $lp );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.rating.info', $Op );
					$lq = convert_uuencode ( $le );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( 'sitepageinvite.utility.type', $lq );
					engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.lsettings', $O5 );
					engine_api::_ ()->sitepage ()->setmodpackageinfo ( 'sitepageinvite', 1 );
					if (empty ( $l5 )) {
						$Oq = explode ( '::', $get_value );
						if (! empty ( $Oq )) {
							$Oq = $Oq [5 * 4 * 2 * 011 / 5 * 3 / 8 * 1 - 024 - 6];
						}
						$lr = Zend_Db_Table_Abstract::getdefaultadapter ();
						$l2 = engine_api::_ ()->getdbtable ( 'menuItems', 'core' );
						$ls = $l2->info ( 'name' );
						$select = $l2->select ()->from ( $ls, array ('id' ) )->where ( 'name = ?', 'core_admin_main_plugins_sitepageinvite' );
						$Os = $select->query ()->fetchall ();
						if (empty ( $Os )) {
							$Oq = explode ( ';', $Oq );
							foreach ( $Oq as $lt ) {
								if (! empty ( $lt )) {
									$lr->query ( $lt );
								}
							}
						}
						if (! empty ( $l6 )) {
							$Ot = APPLICATION_PATH . '/application/settings/general.php';
							if (file_exists ( $Ot )) {
								$lu = include $Ot;
							} else {
								$lu = array ();
							}
							if (! is_writable ( $Ot )) {
								@chmod ( $Ot, 0666 );
							}
							$lu ['environment_mode'] = 'development';
							$Ou = '<?php defined("_ENGINE") or die("Access Denied"); return ';
							$Ou .= var_export ( $lu, TRUE );
							$Ou .= '; ?>';
							@file_put_contents ( $Ot, $Ou );
						}
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.navi.auth', 1 );
						engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $l3 . '.isActivate', 1 );
						if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
							$values = $form->getvalues ();
							if (engine_api::_ ()->sitepage ()->haspackageenable () && isset ( $values ['include_in_package'] ) && ! empty ( $values ['include_in_package'] )) {
								engine_api::_ ()->sitepage ()->oninstallpackageenablesubmodules ( 'sitepageinvite' );
							}
						}
						$this->_helper->redirector->gotoroute ( array ('route' => 'admin-default' ) );
					} else {
						if ($this->getrequest ()->ispost () && $form->isvalid ( $this->getrequest ()->getpost () )) {
							$values = $_POST;
							foreach ( $values as $key => $value ) {
								if ($key == 'pageinvite_show_webmail') {
									$value = serialize ( $value );
								}
								if ($key != 'submit') {
									engine_api::_ ()->getapi ( 'settings', 'core' )->setsetting ( $key, $value );
								}
							}
						}
					}
					$O3 = FALSE;
				} elseif (strstr ( $get_value, 'error' )) {
					$O3 = str_replace ( 'error::', '', $get_value );
				} else {
					$O3 = 'This license key is not valid';
				}
			}
		}
		if (! empty ( $Oi )) {
			$Od = 1;
			$this->view->status = FALSE;
			$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
			$error = $Oi;
			$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
			$form->adderror ( $error );
			return;
		} else if (! empty ( $O3 )) {
			$Od = 1;
			$this->view->status = FALSE;
			$form->getdecorator ( 'errors' )->setoption ( 'escape', FALSE );
			$error = $O3;
			$error = Zend_Registry::get ( 'Zend_Translate' )->_ ( $error );
			$form->adderror ( $error );
			return;
		}
	 endif;
 endif;
?>
